Str=input("请输入一串字符:")
EnglishNum=0
Numbers=0
SpaceNum=0
OtherNum=0
for str in Str:
    if str.isalpha():
        EnglishNum+=1
    elif str.isdigit():
        Numbers+=1
    elif str.isspace():
        SpaceNum+=1
    else:
        OtherNum+=1
print("字母=%d"%EnglishNum)
print("数字=%d"%Numbers)
print("空格=%d"%SpaceNum)
print("其他字符=%d"%OtherNum)